// how to do random forest regression in GEE

// prepare training dataset

var data =  ee.FeatureCollection(Points)
var data = data.randomColumn('random')
var split = 0.9
var trainingData = data.filter(ee.Filter.lt('random',split))
var validationData = data.filter(ee.Filter.gte('random',split))

// init classifier
var classifier = ee.Classifier.smileRandomForest(100, null, 1, 0.5, null, 0)
    .setOutputMode('REGRESSION')
    .train({
        features: trainingData,
        classProperty: 'response',
        inputProperties: ['x1','x2','x3']
    })


// the classifier is for image, so we need `map` with imageCollection
var roi = L8.select(predictors).map(function (image) {
    return image.addBands(image.classify(classifier,'predicted'))
  }).aside(print,'predicted')
      